home *** CD-ROM | disk | FTP | other *** search
- Path: ix.netcom.com!netnews
- From: jlilley@ix.netcom.com (John Lilley)
- Newsgroups: comp.lang.c++
- Subject: Re: Newbie Q, please Help
- Date: 18 Mar 1996 17:28:40 GMT
- Organization: Netcom
- Message-ID: <4ik6g8$14k@reader2.ix.netcom.com>
- References: <4ii7pc$d27@news-e2c.gnn.com>
- NNTP-Posting-Host: den-co8-14.ix.netcom.com
- Mime-Version: 1.0
- Content-Type: Text/Plain; charset=US-ASCII
- X-NETCOM-Date: Mon Mar 18 9:28:40 AM PST 1996
- X-Newsreader: WinVN 0.99.7
-
- In article <4ii7pc$d27@news-e2c.gnn.com>, ScottDrane@gnn.com says...
- >
- > I'm getting a linker error when trying to
- >compile my latest project:
- > Segment MYPROGRAM_TEXT exceeds 64K
-
- You didn't mention the compiler, but they all have some option
- like "far data threshold" or "segment threshold", which defaults
- to something like 32k. Set this to something like 256.
-
- Secondly if you have any large static arrays like:
- int myData[2048];
- make it explicitly far:
- int far myData[2048];
-
- Third, you can edit your DEF file and decrease the stack space
- a bit to say, 10240, but be careful as that can cause stack
- overflow problems.
-
- > I tried to recompile under a different
- >memory model, but the compiler told me
- >Windows only works with the large model.
- >Can anyone straighten me out?
-
- This is not true -- Windows 3.x supports tiny, medium, compact,
- and large -- but "large" model is the best you can do
- under Windows 3.x without resorting to "huge", which is
- not supported by the standard libraries. You could also
- compile with Win32s and get a flat address space; that's
- somewhat involved but may be worth it if the above does not help.
-
- john lilley
-
-